import React, {Component} from 'react';
import {Result, Button} from 'antd';
import './NotFound.css';


class NotFound extends Component {
    constructor(props) {
        super(props);
        this.state = {
        };
    }

    render() {
        return (
            <Result
                status="404"
                title="404"
                subTitle="Sorry, the page you visited does not exist."
                extra={<Button type="primary" onClick={()=>this.handleBack()}>Back Home</Button>}
            />
        )
    }

    componentDidMount() {

    }

    /**
     * 处理返回首页事件
     */
    handleBack(){
        this.props.history.push('/index')
    }
}
export default NotFound;
